package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.core.tool.FormatUtil;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtCouponBatch;
import com.ymttest.database.model.YmtCouponConversionBill;
import com.ymttest.utils.EnvSetup;

public class YmtCouponConversionBillWapper {
	SqlManager manage;

    public YmtCouponConversionBillWapper() {
        manage = new SqlManager("ymt" + EnvSetup.getEnv());
    }
    
    public List<YmtCouponConversionBill> selectByBillName(String billName) {
        List<YmtCouponConversionBill> result = manage
                .getSelectResults(
                        "com.ymttest.database.mapping.YmtCouponConversionBillMapper.selectByBillName",
                        billName);
        return result;
    }
    
    public List<YmtCouponConversionBill> getTop1() {
        List<YmtCouponConversionBill> result = manage
                .getSelectResults(
                        "com.ymttest.database.mapping.YmtCouponConversionBillMapper.getTop1",
                        null);
        return result;
    }
    
    public List<YmtCouponConversionBill> getTop1RandomBill() {
        List<YmtCouponConversionBill> result = manage
                .getSelectResults(
                        "com.ymttest.database.mapping.YmtCouponConversionBillMapper.getTop1RandomBill",
                        null);
        return result;
    }
    
    
    public static void main(String[] args) {
    	YmtCouponConversionBillWapper test = new YmtCouponConversionBillWapper();
        System.out.print(FormatUtil.beanToGSONString(test.selectByBillName("自动化测试创建兑换码单据_0HYSyoij")));
    }
    
}
